package br.com.tcc.systemdx.domain;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

@Entity
@DiscriminatorValue(ValorGenerico.Tipo.SINTOMA)
public class ValorSintoma extends ValorGenerico {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1966783006247197060L;
	
	@ManyToMany
    @JoinTable(
    		name = "atributovalor", 
    		joinColumns = { @JoinColumn(name = "valorid") },
    		inverseJoinColumns = { @JoinColumn(name = "atributoid") }
    		)
    private List<AtributoSintoma> atributos;
	
	@Override
	public String getTipo() {
		return ValorGenerico.Tipo.SINTOMA;
	}
	
	public List<AtributoSintoma> getAtributos() {
		return atributos;
	}
	
	public void setAtributos(List<AtributoSintoma> atributos) {
		this.atributos = atributos;
	}
	
}
